#import LinearRecycleLayoutManager kivy.garden.recycleview.LinearRecycleLayoutManager

#     Goblinoid: Experience all of MediaGoblin on an Android Device
#     Copyright (C) 2015 Dylan Jeffers 
# 
#     This program is free software: you can redistribute it and/or modify
#     it under the terms of the GNU General Public License as published by
#     the Free Software Foundation, either version 3 of the License, or
#     (at your option) any later version.
# 
#     This program is distributed in the hope that it will be useful,
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#     GNU General Public License for more details.
# 
#     You should have received a copy of the GNU General Public License
#     along with this program.  If not, see <http://www.gnu.org/licenses/>.

#screen let's user add title, description, to, and cc for media
<UploadView>
    BoxLayout:
        #image_dir: image_dir1
        orientation: 'vertical'
        Image:
            id: img
            source: root.upload_image
            size_hint_y: 0.4
        TextInput:
            id: title
            size_hint_y: 0.1
            hint_text: 'Title'
        TextInput:
            id: desc
            size_hint_y: 0.2
            hint_text: 'Description'
        TextInput:
            id: to
            size_hint_y: 0.1
            hint_text: 'To:'
        TextInput:
            id: cc
            size_hint_y: 0.1
            hint_text: 'CC:'
        Button:
            size_hint_y: 0.1
            text: 'Upload'
            on_release: root.upload_media()


#displays users media from file (currently under heavy development)
<GalleryView>
    image_grid: image_grid
    BoxLayout:
        orientation: 'vertical'
        Button:
            size_hint: (1.0, 0.1)
            text: 'upload'
            on_release: root.manager.media_service.upload_image = root.highlighted_image; root.manager.parent.parent.open_media_view('upload', False) if root.highlighted_image else 0
        ScrollView:
            size: self.size
            GridLayout:
                size_hint_y: None
                row_default_height: 200 
                row_force_defualt: True
                id: image_grid
                cols: 4


#opens camera for quick image upload
<CameraView>
    BoxLayout:
        orientation: 'vertical'
        AndroidCameraM:
            id: camera
            size_hint: (1.0, 0.9)
        Button:
            size_hint: (1.0, 0.1)
            #find better button to do snapshot animation
            text: 'take photo'
            #on_release: app.open_upload(self)

#opens camcorder for quick video upload
<CamcorderView>
    BoxLayout:
        orientation: 'vertical'
        AndroidCameraM
            id: camera
            size_hint: (1.0, 0.9)
        ToggleButton:
            size_hint: (1.0, 0.1)
            #find better button to do snapshot animation
            text: 'take video' 
            #on_press: camera.play = not camera.play
    
